package quotation.web.ipms.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import quotation.R.R;
import quotation.web.ipms.ddd.form.impsCaculateForm;
import quotation.web.ipms.service.IpmsService;
import quotation.web.qes.ddd.form.QesCaculateForm;
import quotation.web.qes.service.QesService;

import java.math.BigDecimal;

/**
 * @author lyx
 * @date 2025/2/19
 */
@RestController
@RequestMapping("/ipms")
@Api(tags = "ipms计算")
public class IpmsController {

    @Autowired
    private IpmsService impmsService;


    @PostMapping("/caculate")
    @ApiModelProperty(value = "ipms计算")
    public R caculate(@RequestBody impsCaculateForm form) {

        BigDecimal caculate = impmsService.caculate(form);
        return R.success("计算成功", caculate);
    }

}
